const promise1 = Promise.resolve(3);
const promise2 = 42;
const promise3 = new Promise<string>((resolve, reject) => {
  setTimeout(resolve, 100, 'foo');
});

const p = PromiseAll([promise1, promise2, promise3] as const)

declare function PromiseAll<T extends unknown[]>(opt: readonly [...T]): Parasms<T>;

type Parasms<T extends unknown[]> = {
  [K in keyof T]: T[K] extends Promise<infer A> ? A : T[K]
}